<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>个人资料</title>
    <meta name="viewport" content="user-scalable=no">
	<meta http-equiv="pragma" content="no-cache">
  	<meta http-equiv="cache-control" content="no-cache">
  	<meta http-equiv="expires" content="0">
  	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  	<meta http-equiv="description" content="This is my page">
    <link rel="stylesheet" href="static/weixin/plug/weui/css/weui.css">
    <link rel="stylesheet" href="static/weixin/plug/weui/css/jquery-weui.css">
    <link rel="stylesheet" type="text/css" href="static/weixin/css/common.css">
	<link rel="stylesheet" href="static/weixin/plug/icalendar/lCalendar.css">
	<script type="text/javascript" src="static/weixin/js/myJs.js"></script>
  </head>

  <body>
    <form action="weixin/vip/editUser" name="Form" id="Form" method="post">
  	<input type="hidden" name="openid" id="openid" value="${pd.openid}"/>
    <div class="login_list">
      <span>姓名</span>
      <input type="text" name="name" placeholder="请输入姓名" value="${pd.name}">
    </div>
    <div class="login_list">
      <span>性别</span>
      <input id="sex" type="text" name="xb" placeholder="请输入姓名" onfocus="this.blur();" value="${pd.xb}">
    </div>
		<div class="login_list">
			<span>出生日期</span>
			<input type="text" data-toggle='date' id="my-input" onfocus="this.blur();" readonly="readonly" name="csrq" id="my-input" value="${pd.csrq }" placeholder="出生日期"/>
		</div>
		<div class="login_list">
		 <span>邮箱</span>
		 <input type="text" name="email" id="email" placeholder="邮箱" value="${pd.email }"/>
	 	</div>
    <div class="login_list">
      <span>地区</span>
      <input type="text" id='city-picker' name="dq" value="${pd.dq }" placeholder="请选择地区"/>
			<!-- value="${pd.dz }" -->
    </div>
		<div class="login_list">
			<span>详细地址</span>
			<input type="text" id="dz" name="dz" value="${pd.dz }" type="text" placeholder="请输入详细地址">
		</div>
		<div class="login_list">
			<span>手机号码</span>
			<input type="number" name="sjh" value="${pd.sjh}" onfocus="this.blur();" readonly  placeholder="请输入手机号码">
		</div>
		<!-- <div class="login_list1">
			<span>验证码</span>
			<input type="text" v-model="login_info.verification" id="verification" placeholder="请输入验证码" maxlength="6" >
			<label id="verification_btn" class="weui-btn weui-btn_plain-primary">获取验证码</label>
		</div> -->
		<div class="login_btn">
			<input class="weui-btn weui-btn_primary" type="submit" onclick="return checkNull()"  value="保 存">
		</div>
  </form>
	<script type="text/javascript" src="static/weixin/js/jquery-2.1.3.min.js"></script>
	<script type="text/javascript" src="static/weixin/plug/weui/js/jquery-weui.js"></script>
	<script src="static/weixin/plug/icalendar/lCalendar.js"></script>
	<script type="text/javascript" src="static/weixin/plug/weui/js/city-picker.js" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
			var calendar = new lCalendar();
				calendar.init({
					'trigger': '#my-input',
					'type': 'date'
				});

			/* $("#verification_btn").on("click",function(){
				var _this = this;
				if($(this).hasClass('weui-btn_plain-disabled')){
					$.toast("请一分钟后再次获取验证码", "text");
				}else{
					$(this).addClass("weui-btn_plain-disabled");
					setTimeout(function(){
						$(_this).removeClass("weui-btn_plain-disabled")
					},60000)
				}
			}) */

			// 选择性别
			$("#sex").select({
				items: ["男", "女"]
			});

			$("#city-picker").cityPicker({
				title: "请选择省市区/县"
			});
			// $("#city-picker").val(220102);
			// $("#city-picker").data().picker.value=['北京','北京','海淀区'];

			// $("#city-picker").cityPicker.prototype.defaults
		})

	function checkNull() {
		//$("input[type$='text']").each(function(n) {
		var rs = true;
		$("input").each(function(n) {
			if ($(this).val() == "" && "dz,city-picker,email".indexOf($(this).attr("id")) == -1) {
				//$(this).attr("placeholder", $(this).attr("placeholder") + " 不能为空");
				$(this).attr("class", "invalid");
				rs = false;
			}
		});
		return rs;
	}
</script>
  </body>
</html>
